package com.shiyi.design.decorator;

/**
 * @author wangzhanshuai
 * @date 2021/2/1 9:50 下午
 * @since 1.0
 */
public class Client {
    public static void main(String[] args) {
        MilkDecorator milkDecorator = new MilkDecorator(new Decaf());
        System.out.println(milkDecorator.cost());
        System.out.println(milkDecorator.getDesc());

        SugarDecorator sugarDecorator = new SugarDecorator(milkDecorator);
        System.out.println(sugarDecorator.getDesc());
        System.out.println(sugarDecorator.cost());
    }
}
